namespace GameSchoolApplication.Migrations
{
    using System.Data.Entity.Migrations;
    
    public partial class AddLikeCommentFK : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("Likes", "Comment_CommentId", "Comments");
            DropIndex("Likes", new[] { "Comment_CommentId" });
            RenameColumn(table: "Likes", name: "Comment_CommentId", newName: "CommentId");
            AddForeignKey("Likes", "CommentId", "Comments", "CommentId", cascadeDelete: false);
            CreateIndex("Likes", "CommentId");
        }
        
        public override void Down()
        {
            DropIndex("Likes", new[] { "CommentId" });
            DropForeignKey("Likes", "CommentId", "Comments");
            RenameColumn(table: "Likes", name: "CommentId", newName: "Comment_CommentId");
            CreateIndex("Likes", "Comment_CommentId");
            AddForeignKey("Likes", "Comment_CommentId", "Comments", "CommentId");
        }
    }
}
